package cn.tedu.spring.autowired;

import cn.tedu.spring.autowired.controller.UserController;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author ruoLi
 */
public class TestController {
    @Test
    public void autowiredTest(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        UserController controller= context.getBean("userController",UserController.class);
        controller.controller();
    }
}
